﻿<Page
    x:Class="RoboRun.LevelScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RoboRun"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
	<Page.Resources>
		<Style x:Key="Level1ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
                            <Image Source="Assets/LevelScreen/Level1.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level2ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level1" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level2.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level3ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level7" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level3.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level4ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level9" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level4.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level5ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level8" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level5.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level6ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level6" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level6.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level7ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level5" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level7.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level8ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level4" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level8.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="Level9ButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Rectangle x:Name="level3" StrokeThickness="5"/>
							<Image Source="Assets/LevelScreen/Level9.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Page.Resources>
        <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="Assets/SplashScreen/SplashScreenBackground.png" Stretch="Uniform"/>
        </Grid.Background>
            <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition x:Name="levelGrid"  Height="5*"/>
        </Grid.RowDefinitions>
            <Button x:Name="backButton" 
            HorizontalAlignment="Left" 
            VerticalAlignment="Center"
            Click="backButton_Click"
            
            Grid.Row="0"/>
            <TextBlock x:Name="levelsTitle"
                   Text="Select a Level"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Grid.Row="0" FontSize="48" FontWeight="SemiLight" />
        <Button x:Name="level1Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level1Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level1ButtonImage"  Source="Assets/LevelScreen/Level1.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level2Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level2Button_Click"  BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}" >
            <Image x:Name="level2ButtonImage"  Source="Assets/LevelScreen/Level2.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level3Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level3Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level3ButtonImage"  Source="Assets/LevelScreen/Level3.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level4Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level4Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level4ButtonImage"  Source="Assets/LevelScreen/Level4.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level5Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level5Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level5ButtonImage"  Source="Assets/LevelScreen/Level5.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level6Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level6Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level6ButtonImage"  Source="Assets/LevelScreen/Level6.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level7Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level7Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level7ButtonImage"  Source="Assets/LevelScreen/Level7.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level8Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level8Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level8ButtonImage"  Source="Assets/LevelScreen/Level8.png" Stretch="Fill"/>
        </Button>
        <Button x:Name="level9Button" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Click="level9Button_Click" BorderBrush="{x:Null}" Background="{x:Null}" Foreground="{x:Null}">
            <Image x:Name="level9ButtonImage"  Source="Assets/LevelScreen/Level9.png" Stretch="Fill"/>
        </Button>
    </Grid>      
</Page>